package org.example;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;

public class Main {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException {
        Class aClass = Class.forName("org.example.Student");
//        Constructor[] declaredConstructors = aClass.getConstructors();
//        for (Constructor declaredConstructor : declaredConstructors) {
//            System.out.println(declaredConstructor);
//        }
        Constructor declaredConstructor = aClass.getConstructor(String.class,int.class);
//        System.out.println(declaredConstructor);
        Field[] declaredFields = aClass.getDeclaredFields();
//        for (Field declaredField : declaredFields) {
//            System.out.println(declaredField);
//        }
        Field[] fields = aClass.getFields();
        for (Field field : fields) {
            System.out.println(field);
        }
        aClass.getMethods();
    }
}